// =============================================================
// CProperty
// ---------------------------------------
// Author : Woo-Hyun Kim
// Email : woorung@icu.ac.kr or woorung@nhncorp.com
// Date : Jul. 10, 2006
// =============================================================
#ifndef CPropertyH
#define CPropertyH
//-----------------------------------------------------------------
#include <iostream>
#include <iterator>
#include <map>
#include <algorithm>
#include <fstream>
#include <string>

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>

#include <pthread.h>

#include "tokenizer/CLineTokenizer.h"

using namespace std;
//---------------------------------------------------------------
class CProperty {
private :
	char delim;
	char eol;
	char *comment;
	char *ignore;

	pthread_mutex_t _mutex;

	map<string,string> property;

	int trim_key(string &str);
	int trim(string &str);

public :
	CProperty(char *conf);
	virtual ~CProperty();

	pair<string,string> &get(pair<string,string> &kv);

	int print();
};
//----------------------------------------------------------------
#endif
